package cn.lh.basic.util;

import lombok.Data;

@Data
public class JsonResult {
    private Boolean success;
    private String msg;
    private Object resultObj;
    private static final JsonResult JSON_RESULT = new JsonResult();

    private JsonResult() {}


    public static JsonResult set(Boolean success, String msg) {
        JSON_RESULT.setResultObj(null);
        JSON_RESULT.setMsg(msg);
        JSON_RESULT.setSuccess(success);
        return JSON_RESULT;
    }
    public static JsonResult setResultObject(Object obj){
        JSON_RESULT.resultObj = obj;
        return JSON_RESULT;
    }
}
